class Image(db.Model):
    name        = db.StringProperty()
    content     = db.BlobProperty()

class UploadImage(webapp.RequestHandler):
    def post(self):
        if 'file' not in self.request.POST:
            self.error(400)
            self.response.out.write("file not specified!")
            return

        if (self.request.POST.get('file', None) is None or
           not self.request.POST.get('file', None).filename):
            self.error(400)
            self.response.out.write("file not specified!")
            return

        file_data = self.request.POST.get('file').file.read()
        file_name = self.request.POST.get('file').filename

        im = Image()
        im.name    = file_name
        im.content = file_data
        im.save()
        self.response.out.write("image %r saved." % im.name)


<form action="." method="post" enctype="multipart/form-data">
    <label>File: </label><input name="file" type="file"><br />
    <input type="submit">
</form>